/*
 *  ump.h
 *  UMPTest
 *
 *  Created by Jonathan Diehl on 03.03.10.
 *  Copyright 2010 RWTH. All rights reserved.
 *
 */

// ump context information
typedef struct {
	unsigned char *data;
	int width;
	int height;
	int length;
	int read_index;
	int touch_threshold;
} ump_context;

// ump touch information
typedef struct {
	float x;
	float y;
	float pressure;
} ump_touch;

// ump touch list
typedef struct {
	ump_touch touch;
	ump_touch prev_touch;
	void *next;
} ump_touch_list;

// methods
int ump_read_touches(ump_context *umpc, ump_touch_list **touch_list, int touchesLength);
void ump_free_touches(ump_touch_list *touch_list);
int ump_read(ump_context *umpc, unsigned char *buffer, int length);
int ump_init(ump_context *umpc, int width, int height);
int ump_deinit(ump_context *umpc);
